package com.gbas.comu.servlet.struts;

import com.gbas.comu.dao.DaoService;
import com.gbas.comu.model.Liga;
import com.gbas.comu.service.LigaService;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.MappingDispatchAction;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class JornadaActions extends MappingDispatchAction {
    public ActionForward create(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse response) throws Exception {
        String ligaId = httpServletRequest.getParameter("liga");
        if (ligaId != null) {
            final Liga liga = DaoService.getLigaDAO().findById(Long.parseLong(ligaId));
            if (liga != null) {
             //  get
            }
        }
        return actionMapping.findForward("success");
    }
}
